package io.unicorn.modules.water.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import io.unicorn.commons.dynamic.datasource.annotation.DataSource;
import lombok.Data;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * ${comments}
 * 
 * @author LNCG
 * @email LNCG@USTL.EDU.CN
 * @date 2021-04-10 10:01:48
 */
@Data
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 10)
@HeadFontStyle(fontHeightInPoints = 10)
@ContentStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 10)
@ContentFontStyle(fontHeightInPoints = 10)
@ColumnWidth(15)
@TableName("Gather_DB.dbo.T_Account_Manage")
public class TAccountManageEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.INPUT)
	@ExcelProperty(value = "小区名称")
	private String proName;

	@ExcelProperty(value = "设备数量")
	private Integer deviceCount;
	@ExcelProperty(value = "区域码")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String areaId;
	@ExcelProperty(value = "水所码")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private Integer unitWId;

	@ExcelIgnore
	private Integer unitGId;

	@ExcelProperty(value = "采集方式码")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private Integer modeId;

	@ExcelProperty(value="竣工时间")
	private String installerName;

	@ExcelProperty(value = "是否竣工")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String installerPhone;

	@ExcelProperty(value = "项目经理")
	private String debugerName;

	@ExcelProperty(value = "开工时间")
	private String debugerPhone;
	/**
	 * 小区横坐标
	 */
	@ExcelIgnore
	private String mapX;
	/**
	 * 小区纵坐标
	 */
	@ExcelIgnore
	private String mapY;
	
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	@ExcelProperty(value = "小区类型")
	private Integer proTypeId;
	@ExcelIgnore
	private String memo1;
	@ExcelIgnore
	private String memo2;
	@ExcelIgnore
	private String memo3;
	@ExcelIgnore
	private String memo4;
	@ExcelIgnore
	private String memo5;
	@ExcelIgnore
	private String memo6;
	@ExcelIgnore
	private String memo7;
	@ExcelIgnore
	private Date beforedate;
	@ExcelIgnore
	private Date afterdate;
	@ExcelIgnore
	private BigDecimal beforedata;
	@ExcelIgnore
	private BigDecimal afterdata;
	@ExcelIgnore
	private BigDecimal beforetotaldata;
	@ExcelIgnore
	private BigDecimal aftertotaldata;
	@ExcelIgnore
	private Integer faultcount;
	@ExcelIgnore
	private Integer abnormal;
	@ExcelIgnore
	private Date nowDate;
	@ExcelProperty(value = "总表数")
	private Integer sCount;
	@ExcelIgnore
	private String mapWaiwang;
	@ExcelIgnore
	private Date updatepardate;

	//保洁表数
	@ExcelProperty(value = "保洁表数")
	private Integer cleanCount;
	//网点表数
	@ExcelProperty(value = "网点表数")
	private Integer salesCount;
	//小区说明
	@ExcelProperty(value = "小区说明")
	private String proDesc;

	//2022.1.18 显示名称
	@TableField(exist=false)
	@ExcelProperty(value = "areaName")
	private String areaName;

	@ExcelProperty(value = "unitName")
	@TableField(exist=false)
	private String unitName;

	@ExcelProperty(value = "modeName")
	@TableField(exist=false)
	private String modeName;

	@ExcelProperty(value = "proTypeName")
	@TableField(exist=false)
	private String proTypeName;

	@ExcelProperty(value = "分期分段")
	private String desc1;
	@ExcelProperty(value = "楼号")
	private String desc2;
	@ExcelProperty(value = "合同签订时间")
	private String desc3;
	@ExcelProperty(value = "验收时间")
	private String desc4;

	@ExcelProperty(value = "水表品牌")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String desc5;

	@ExcelProperty(value = "表拿子")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String desc6;
	@ExcelProperty(value = "减压阀")
	private String desc7;
	@ExcelProperty(value = "阀门")
	private String desc8;
	@ExcelProperty(value = "合格证日期")
	private String desc9;

	@ExcelProperty(value = "安装位置")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String desc10;
	@ExcelProperty(value = "系统改造时间")
	private String desc11;
	@ExcelProperty(value = "改造记录")
	private String desc12;

	@ExcelProperty(value = "水表类型")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String desc13;

	@ExcelProperty(value = "系统类型")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String desc14;
	@ExcelIgnore
	private String desc15;
	@ExcelIgnore
	private String desc16;
	@ExcelIgnore
	private String desc17;
	@ExcelIgnore
	private String desc18;
	@ExcelIgnore
	private String desc19;
	@ExcelIgnore
	private String desc20;


	public static Map<String, String> getHeadName(){
		Map<String, String> headMap = new LinkedHashMap<String, String>();

		headMap.put("proName","小区名称");
		headMap.put("desc1","分期分段");
		headMap.put("desc2","楼号");
		headMap.put("areaId","区域码");
		headMap.put("areaName","分公司");
		headMap.put("unitWId","水所码");
		headMap.put("unitName","管理所");
		headMap.put("modeId","采集方式码");
		headMap.put("modeName","采集方式");
		headMap.put("deviceCount","设备数量");
		headMap.put("sCount","总表数");
		headMap.put("cleanCount","保洁表数");
		headMap.put("salesCount","网点表数");
		headMap.put("desc3","合同签订时间");
		headMap.put("debugerPhone","开工时间");
		headMap.put("installerName","竣工时间");
		headMap.put("desc4","验收时间");
		headMap.put("installerPhone","是否竣工");
		headMap.put("debugerName","项目经理");
		headMap.put("desc13","水表类型");
		headMap.put("desc5","水表品牌");
		headMap.put("desc6","表拿子");
		headMap.put("desc7","减压阀");
		headMap.put("desc8","阀门");
		headMap.put("desc9","合格证日期");
		headMap.put("desc10","安装位置");
		headMap.put("desc11","系统改造时间");
		headMap.put("desc12","改造记录");

		headMap.put("proTypeId","类型码");
		//headMap.put("proTypeName","类型");
		headMap.put("proDesc","小区说明");
		//headMap.put("unitGId","气所码");
		headMap.put("mapX","横坐标");
		headMap.put("mapY","纵坐标");
		headMap.put("memo1","备注1");
		headMap.put("memo2","备注2");
		headMap.put("memo3","备注3");
		headMap.put("memo4","备注4");
		headMap.put("memo5","备注5");
		headMap.put("memo6","备注6");
		headMap.put("memo7","备注7");
		headMap.put("beforedate","之前日期");
		headMap.put("afterdate","之后日期");
		headMap.put("beforedata","之前数据");
		headMap.put("afterdata","之后数据");
		headMap.put("beforetotaldata","之前总数据");
		headMap.put("aftertotaldata","之后总数据");
		headMap.put("faultcount","故障数");
		headMap.put("abnormal","异常");
		headMap.put("nowDate","时间");
		headMap.put("mapWaiwang","图纸");
		headMap.put("updatepardate","更新时间");

		headMap.put("desc14","系统类型");

		return headMap;
	};
}
